const initialState = {
  isLoading: false,
}

export const loadingReducer = (state = initialState, { type, payload }) => {
  switch (type) {
    case 'change_loading':
      return {
        ...state,
        isLoading: payload,
      }

    default:
      return state
  }
}
